<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			// 加载事件onload,在页面加载完之后被触发
			window.onload = function(){
				var innerHtmlDiv = document.getElementById("innerHtmlDiv");
				var innerTextDiv = document.getElementById("innerTextDiv");
				innerHtmlDiv.innerHTML = "<span style = 'color:red'>inner</span>"
				innerTextDiv.innerText = "<span style = 'color:red'>inner</span>"
 			}
		</script>
	</head>
	<body>
		<div id="innerHtmlDiv"></div>
		<div id="innerTextDiv"></div>
	</body>
</html>
